﻿#region

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Vin.Tool.AspNetCore.Singleton;

#endregion

namespace Vin.Extension.Framework.Monitor;

[Order(9)]
public class ExtensionEntry : IVinApiExtension
{
    public void AddVinExtension(WebApplicationBuilder builder)
    {
        // 给所有的控制器添加一个全局的过滤器
        builder.Services.AddControllers(options =>
        {
            options.Filters.Add<Filters.RequestLogAttribute>();
        });
    }

    public void AddVinExtension(IServiceCollection services)
    {
    }

    public void UseVinExtension(IApplicationBuilder app)
    {
    }
}